//@flow

/**
 * 获取到第三方组件的可用情况
 */
type ThirdPartAvailabelProps = {
    isSupport : boolean;
    message   : string ;
    platform  : string ;
}
export class ThirdPartAvailabel{

    constructor(data:ThirdPartAvailabel){
        this.isSupport = data.isSupport;
        this.message = data.message;
        this.platform = data.platform;
    }
    /**能否使用 */
    _isSupport: boolean = false;
    get isSupport(): boolean {
        return this._isSupport;
    }
    set isSupport(value: boolean) {
        this._isSupport = value;
    }

    /**原因说明 */
    _message: string = '未知原因';
    get message(): string {
        return this._message;
    }
    set message(value: string) {
        this._message = value;
    }

    /**平台 */
    _platform: 'wechat' | 'alipay';
    get platform(): 'wechat' | 'alipay' {
        return this._platform;
    }
    set platform(value: 'wechat' | 'alipay') {
        this._platform = value;
    }
    
}


/**
 * 第三方插件对象
 */
export type ThirpPartType = {
    platform : string,
    configKey : string,
    installCheckAction:()=>{},//是否安装的校验方法
    iconName : string,//这里icon name用的是ant design
}
